package com.ymttest.common.enums;

public enum CouponUsageEnum {
	/**
	 * 普通优惠券
	 */
	Common(1),

	/**
	 * 推广码
	 */
	Promotion(2);

	private int intValue;
	private static java.util.HashMap<Integer, CouponUsageEnum> mappings;

	private synchronized static java.util.HashMap<Integer, CouponUsageEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, CouponUsageEnum>();
		}
		return mappings;
	}

	private CouponUsageEnum(int value) {
		intValue = value;
		CouponUsageEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static CouponUsageEnum forValue(int value) {
		return getMappings().get(value);
	}
}